﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.WinControls.UI;
using Telerik.WinControls;

namespace Bike.Forms
{
   public class BikeForm : RadForm
    {
       private System.Windows.Forms.ErrorProvider errorProvider;
        private System.ComponentModel.IContainer components;

        public bool CheckEmpty(RadTextBox control, string message)
        {
            if (string.IsNullOrEmpty(control.Text))
            {
                errorProvider.SetError(control, message);
                return false;
            }
            else
            {
                errorProvider.SetError(control, "");
                return true;
            }
        }
       public BikeForm()
       {
           InitializeComponent();
           UIHelper.SetupDialog(this);
       }
       protected void ShowInfomationBox(string msg, string caption)
       {
           RadMessageBox.Show(msg, caption, System.Windows.Forms.MessageBoxButtons.OK, RadMessageIcon.Info);
       }

       private void InitializeComponent()
       {
            this.components = new System.ComponentModel.Container();
            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            // 
            // errorProvider1
            // 
            this.errorProvider.ContainerControl = this;
            // 
            // BikeForm
            // 
            this.ClientSize = new System.Drawing.Size(292, 266);
            this.Name = "BikeForm";
            // 
            // 
            // 
            this.RootElement.ApplyShapeToControl = true;
            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);

       }
    }
}
